package com.songyang.yougnsql.server.transport;

import com.songyang.yougnsql.server.serialize.inter.YoungSqlSerialize;

/**
 * @ClassName Package
 * @Description
 * @date 2022/12/23 15:46
 * @Author yanceysong
 * @Version 1.0
 */
public class YoungSQLDataPackage {
    private String data;
    private String errMsg;
    private short encoderType;

    public YoungSQLDataPackage(String data, String errMSG, Short encoderType) {
        this.data = String.valueOf(data);
        this.errMsg = errMSG;
        this.encoderType = encoderType;
    }

    public YoungSQLDataPackage(String data, String errMSG) {
        this.data = String.valueOf(data);
        this.errMsg = errMSG;
        this.encoderType = YoungSqlSerialize.YOUNG_SERIALIZE;
    }

    private YoungSQLDataPackage() {
    }

    public short getEncoderType() {
        return encoderType;
    }

    public String getData() {
        return data;
    }

    public String getErr() {
        return errMsg;
    }
}
